package com.fanshuai.springcloud.feign;

import com.fanshuai.springcloud.domain.User;
import com.fanshuai.springcloud.web.enums.StatusCode;
import com.fanshuai.springcloud.web.response.CallResult;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
public class UserServiceFallback implements UserServiceFeign2 {
    @Override
    public CallResult<List<User>> list() {
        return new CallResult<>(StatusCode.FAILED);
    }

    @Override
    public CallResult<User> one(long userId) {
        return new CallResult<>(StatusCode.FAILED);
    }

    @Override
    public CallResult<Boolean> add(User user) {
        return new CallResult<>(StatusCode.FAILED);
    }

    @Override
    public CallResult<Boolean> delete(long userId) {
        return new CallResult<>(StatusCode.FAILED);
    }
}
